<?php use_helper('Javascript'); ?>

<div id="sf_admin_container">
  <h3>Tri des galleries publiées</h3>

  
  <?php echo link_to('Sauvegarder l\'ordre', 'gallery/index') ?>

  <div id="sorter">
  <?php if ($galleries): ?>
  <ul id="order">
    <?php foreach ($galleries as $gallery): ?>
    <li id="item_<?php echo $gallery->getId() ?>" class="sortable">
      <?php echo $gallery->getTitle() ?>
    </li>
    <?php endforeach; ?>
  </ul>
  <?php endif; ?>
  </div>
  
  
</div>

<?php echo sortable_element('order', array(
  'url'    => 'gallery/saveGalleryOrder',
  'update' => 'feedback',
  'only'   => 'sortable',
)) ?>